<script type="text/javascript" src="js/searchScript.js"></script>
                <div id="sidebar">

                	<div class="sidebar_box">
                    
                    	
						<% if ( null == request.getSession().getAttribute("username") ) 
							{%> <h3>Login &amp; Register</h3>
							<% if ( null != request.getSession().getAttribute("Error")) 
								{ %>
								<span style="color:red"><%= request.getSession().getAttribute("Error") %> </span>
								<%}
									request.getSession().removeAttribute("Error");
								%>
								
								<form name="login_input" action="Login" method="post" onsubmit="return validateinput();">
								<label for="loginusername"><span class="loginText">Username: </span></label><br/>
								<input class="loginBox"type="text" name="loginusername" id="loginusername" />
								<br/><span style="color:red" id="loginusernameillegal"></span>
								<br/>
								<label for="loginpassword"><span class="loginText">Password: </span></label><br/>
								<input class="loginBox" type="password" name="loginpassword" id="loginpassword" />
								<br/><span style="color:red" id="loginpasswordillegal"></span>
								<br/>
								<div id="login_buttons">
								<input id="login_button" class="log_buttons" type="submit" value="Login"/>
								<input id="register_button" class="log_buttons"type="button" value="Register" onclick="document.location = 'register.jsp';"/>
								<br/>
								</div>
								</form>
							<%}
							else 
							{%> 
								<h3>Hello <%=request.getSession().getAttribute("username") %>!</h3>
								<div id="loggedin">
								<input type="button" value="My Profile" onclick="document.location = 'userPage.jsp';"/>
								<form name="Logout" action="Logout" method="post">
								<input type="submit" value="Logout" style="width:70px;height:50px;" type="image" src="images/Signout.png" alt="Logout"/>
								</form> 
								<!-- <input type="button" value="My Profile" onclick="document.location = 'userPage.jsp';"/>
								<input style="width:70px;height:50px;" type="image" src="images/buttonProfile.png" onclick="document.location = 'userPage.jsp';" alt="My Profile"/> -->
								
								</div>
							<%} %>
                    </div>
                    
                    <div class="sidebar_box">
					<h3>Search Course</h3>
<% 
					if ( null == request.getSession().getAttribute("username"))
					{
%>
						<i>Search is disabled, please login or register</i>
<%
					}
					else
					{
%>
					   	<form name="search" onsubmit="searchForCourse();return false;"style="padding-top: 5px;">
     					<table border="0" cellpadding="0" cellspacing="0">
	          				<tr>
	               				<td>
	               					<input style="float:left;"type="text" name="searchField" id="searchField" title="Type your search parameters as CSVs [param0,param1,...]"/>
								</td>
								<td>
									<input style="float:left;width:35px;height:35px;" type="image" src="images/black_mag.png" value="Submit" alt="Submit">
								</td>
							</tr>
						</table>
						</form>
                        <span id="searchResults"></span>
<%
                     }   
%>                        
                    </div>
  
                
                </div> <!-- end of sidebar -->
                
                <div class="cleaner"></div>
           </div>
        </div> <!-- end of main wrapper -->
    </div> <!-- end of wrapper -->
 